import java.util.Calendar;
public class CalendarBean {
    String day[];
    int year=2005,month =0;
    /**
     * @return year
     */
    public int getYear() {
        return year;
    }
    /**
     * @param year 要设置的 year
     */
    public void setYear(int year) {
        this.year = year;
    }
    /**
     * @return month
     */
    public int getMonth() {
        return month;
    }
    /**
     * @param month 要设置的 month
     */
    public void setMonth(int month) {
        this.month = month;
    }
    public String[] getCalendar() {
        String a[] = new String[42];
        Calendar cal = Calendar.getInstance();
        cal.set(year, month-1,1);
        int weekofday = cal.get(Calendar.DAY_OF_WEEK)-1;
        int day =0;
        if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
            day=31;
        if(month==4||month==6||month==9||month==11)
            day=30;
        if(month==2)
            if((year%400==0)||(year%4==0&&year%100!=0))
                day=29;
            else
                day=28;
        for(int i =weekofday,n=1;i<weekofday+day;i++) {
            a[i]=String.valueOf(n);
            n++;
        }
        return a;
    }

}
